<%--
  Created by IntelliJ IDEA.
  User: 唐东
  Date: 2021/1/20
  Time: 16:47
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
    <title>我的购物车</title>
    <style>
        .border_distance{
            border:2px solid #CD6090;
        }
        .border_distance tr td{
            border:1px solid #CD6889;
        }
    </style>
</head>
<body bgcolor="pink">
    <h2 align="center">确认订单</h2>
    <hr>
    <form method="post" action="order3.jsp">
        <table  width="650" align="center" class="border_distance" bgcolor="white">
            <thead>
                <tr bgcolor="#DB7093">
                    <td align="center" width="80">商品名称</td>
                    <td align="center">商品单价</td>
                    <td align="center" width="100">购买数量</td>
                    <td align="center" width="100">金额</td>
                </tr>
            </thead>
            <tbody>
                <c:forEach items="${requestScope.carts}" var="cart">
                    <tr>
                        <td align="center"><%=name %></td>
                        <td align="center"><%=price %></td>
                        <td align="center"><%=num%></td>
                        <td align="center"><%=count %></td>
                    </tr>
                    <tr align="center">
                         <td colspan="5">
                             总计：<%=sum %>
                        </td>
                    </tr>
                </c:forEach>
                <tr align="center">
                    <td colspan="5">
                        收获地址：<input type="text" size="20" name="address">
                    </td>
                </tr>
                <tr align="center">
                    <td colspan="5">
                        <a href="index.jsp">继续购买</a>
                        <a href="cart.jsp">返回购物车</a>
                        <input type="submit" value="确认购买">
                    </td>
                </tr>
            </tbody>
        </table>
    </form>
</body>
</html>

